﻿@using MvcCheckBoxList.Model
@model Bonobo.Git.Server.Models.TeamEditModel
@{    
    ViewBag.Title = Resources.Team_Create_Title;
}
<h1>@Resources.Team_Create_Title</h1>

@using (Html.BeginForm("Create", "Team", FormMethod.Post, new { @class = "pure-form pure-form-aligned" }))
{
    @Html.AntiForgeryToken()
    @Html.ValidationSummary(false, Resources.Team_Create_Fail)
    
    <fieldset>
        <div class="pure-control-group">
            @Html.LabelFor(m => m.Name)
            @Html.TextBoxFor(m => m.Name, new { autofocus = "" })<em>*</em>
            @Html.ValidationMessageFor(m => m.Name)
        </div> 
        <div class="pure-control-group">
            @Html.LabelFor(m => m.Description)
            @Html.TextAreaFor(m => m.Description, new { @class = "medium" })
        </div> 
        <div class="pure-control-group checkboxlist">
            @Html.LabelFor(m => m.AllUsers)
            <span>
                @Html.CheckBoxListFor(m => m.PostedSelectedUsers, m => m.AllUsers, m => m.Id, m => m.DisplayName, m => m.SelectedUsers, Position.Vertical)
            </span>
        </div>

        <div class="pure-controls">
            <a class="pure-button" href="@Url.Action("Index")"><i class="fa fa-long-arrow-left"></i> @Resources.Team_Create_Back</a>
            <button type="submit" class="pure-button pure-button-primary"><i class="fa fa-save"></i> @Resources.Team_Create_Submit</button>
        </div>
    </fieldset> 
}
